
    <form class="checkoutform" action="{:U('update')}" method="post" style="margin:-15px; min-height:1000px;">
      
      
      <input type="hidden" name="id" value="{$info.id}" >
      
      
  
     
     
     
     
     
     
     
     <section class="panel">
                        <header class="panel-heading custom-tab turquoise-tab">
                            <ul class="nav nav-tabs">
                                <li class="active">
                                    <a data-toggle="tab" href="#home3">
                                        基本信息
                                    </a>
                                </li>
                                <li>
                                    <a data-toggle="tab" href="#about3">
                                        配图
                                    </a>
                                </li>
                                <li class="">
                                    <a data-toggle="tab" href="#contact3">
                                        
                                        SEO
                                    </a>
                                </li>
                                
                                
                                
                                
                                <volist name="extendsField" id="vo">
   	<li><a data-toggle="tab" href="#extendsField{$vo.id}">{$vo.title}</a></li>
   </volist>
                                


                                
                                
                            </ul>
                        </header>
                        <div class="panel-body">
                            <div class="tab-content">
                                <div id="home3" class="tab-pane active">
                                    <div class="row">
                                        <div class="col-sm-8"><div class="form-group">
      <label class="control-label">文章标题 <notempty name="relateSiteList"><div class="btn-group">
                                            <button data-toggle="dropdown" class="btn btn-default btn-xs dropdown-toggle" type="button">其它版本 <span class="caret"></span></button>
                                            <ul role="menu" class="dropdown-menu"> 
                                            
                                            <volist name="relateSiteList" id="s">
                                                <li><a href="##" onClick="_openWindow('<?php echo U('relateedit', array('site_id' => $s['id'], 'sitesourceid' => $siteid, 'table' => 'News', 'field' => 'title', 'k' => $info['id'], 'type' => 'text'));?>', 400, '{$info.title}【{$s.title}】', '保存',  function(){ }, '');">{$s.title}</a></li></volist>
                                            </ul>
                                        </div></notempty></label>
      
         <input class="form-control" datatype="*" value="{$info.title}" name="title" type="text" placeholder="文章标题">
      
   </div></div>
                                        
                                        <div class="col-sm-4"> <div class="form-group">
      <label class="control-label">所属栏目</label>
     
         <select class="form-control" datatype="*" name="category_id" id="category_id">
          <option value="">请选择</option>
          <volist name="cate_list" id="vo">
          
            <option <eq name="vo['id']" value="$info['category_id']">selected="selected"</eq> value="{$vo.id}">{:getdeepstr($vo['deep'])}{$vo.title}</option>
             <eq name="vo['is_list']" value="1">
            </eq>
          </volist>
        </select>
    
   </div></div>
                                        
                                    </div>
                                    
                                    
                                    
                                    
                                    <div class="row"><div class="col-sm-12"><div class="form-group">
      <label class="control-label">发布日期</label>
      
         <input class="form-control" value="{:date('Y-m-d', $info['datetime'])}" name="datetime" type="text" placeholder="发布日期">
      
   </div>
   
   
   
   
   
   
   
   
   
   <div class="form-group">
      <label class="control-label">文章内容 <notempty name="relateSiteList"><div class="btn-group">
                                            <button data-toggle="dropdown" class="btn btn-default btn-xs dropdown-toggle" type="button">其它版本 <span class="caret"></span></button>
                                            <ul role="menu" class="dropdown-menu" style="z-index:90000000;"> 
                                            
                                            <volist name="relateSiteList" id="s">
                                                <li><a href="##" onClick="_openWindow('<?php echo U('relateedit', array('site_id' => $s['id'], 'sitesourceid' => $siteid, 'table' => 'News', 'field' => 'content', 'k' => $info['id'], 'type' => 'editor'));?>', 800, '{$info.title}【{$s.title}】', '保存',  function(){ }, '');">{$s.title}</a></li></volist>
                                            </ul>
                                        </div></notempty></label>
   
         <html:editor id="editor" name="content" type="UEDIT" style="height:400px; width:100%;">{$info.content}</html:editor>
    
   </div>
   
   </div></div>
                                    
                                    
                                    
                                </div>
                                <div id="about3" class="tab-pane">  
   <div class="form-group">
    
      <label class="control-label">封面图</label>
         <div><input name="img_url" type="hidden" value="{$info.img_url}" /><img onclick="showImgBox(this);" src="<notempty name="info['img_url']">{:getThumbPath($info['img_url'])}<else/>__PUBLIC__/Admin/images/defaultimg.png</notempty>" id="img_url" height="80" /></div>
     
   </div>
   
   
   
  
        <if condition="!isMobile()">
        
        
        <div class="form-group">
     
      
      <div id="img_list">
          <volist name="mimg_url_list" id="vo">
            <div url="{$vo}" class="img_one"><div class="sort" style="padding:5px; background:#7CBD8C"><span class="fl btn-xs" onClick="ml(this);">&lt;</span><span class="fr btn-xs" onClick="mr(this);">&gt;</span><div class="clearfix"></div></div><img height="80" width="80" src="{:getThumbPath($vo)}"><a href="javascript:void(0);" onClick="mdel_img('{$vo}');">删除</a></div>
            </volist>
        </div>
        <div class="clearfix"></div>
         <include file="Public:mupload" />
      
   </div>
   
   
   <else/>
   
   
   
   
   <div class="form-group">
     
      <label class="control-label">图组</label>
      <div id="img_list">
          <div id="img_listBox" style="display:inline;"><volist name="mimg_url_list" id="vo">
            <div url="{$vo}" class="img_one"><div class="sort" style="padding:5px; background:#7CBD8C"><span class="fl btn-xs" onClick="ml(this);">&lt;</span><span class="fr btn-xs" onClick="mr(this);">&gt;</span><div class="clearfix"></div></div><img height="80" width="80" src="{:getThumbPath($vo)}"><a href="javascript:void(0);" onClick="mdel_img('{$vo}');">删除</a><input type="hidden" name="mimg_url[]" value="{$vo}" /></div>
            </volist></div>
            
            <div url="" class="img_one"><input type="hidden" value=""><img height="80" onClick="showImgBox(this);" width="80" src="__PUBLIC__/Admin/images/defaultimg.png" id="addimg__"></div>
        </div>
        <div class="clearfix"></div>
        
      
   </div>
   <style>
	.img_one{position:relative; padding:4px; width:88px; height:130px; margin-left:4px; float:left;}
	.img_one .sort span{cursor:pointer; text-align:center; display:inline-block; background:#fff;}
	.img_one a{position:absolute; bottom:0px; height:24px; line-height:24px; width:88px; left:0px; text-align:center;}
.fl{float:left;}
.fr{float:right;}
</style>
   <script>
       document.getElementById('addimg__').onload = function(){
		  var mhurl = $('#addimg__').prev('input').val();
		  //alert(mhurl);
		  if(!$('#addimg__').hasClass('f')){
			  $('#addimg__').addClass('f');
		      return false;
		  }
		  var mh = $('<div url="'+mhurl+'" class="img_one"><div class="sort" style="padding:5px; background:#7CBD8C"><span class="fl btn-xs" onClick="ml(this);">&lt;</span><span class="fr btn-xs" onClick="mr(this);">&gt;</span><div class="clearfix"></div></div><img height="80" width="80" src="__PUBLIC__'+mhurl+'"><a href="javascript:void(0);">删除</a><input type="hidden" name="mimg_url[]" value="'+mhurl+'" /></div>');
		  mh.appendTo('#img_listBox');
		  
		 mh.find('a').click(function(e) {
            mdel_img(mhurl);
        });
		$('#addimg__').removeClass('f');
		  document.getElementById('addimg__').src = '__PUBLIC__/Admin/images/defaultimg.png';
	   }
	   function mr(e){
		$(e).parent('div').parent('div').next().after($(e).parent('div').parent('div'));
		
		
	}
	function ml(e){
		$(e).parent('div').parent('div').after($(e).parent('div').parent('div').prev());
		
		
	}
   </script>
   
   </if>
   
   
   
   </div>
                                <div id="contact3" class="tab-pane ">  <div class="form-group">
      <label class="control-label">文章标签</label>
      
         <input class="form-control" name="tags" value="{$info.tags}" type="text" id="tags" size="50" />
      
   </div>
   
   <div class="form-group">
      <label class="control-label">外部链接</label>
     
         <input class="form-control" name="outlink" value="{$info.outlink}" type="text" id="outlink" size="50" />
      
   </div>
   <div class="form-group">
      <label class="control-label">页面标题</label>
      
         <input class="form-control" name="page_title" value="{$info.page_title}" type="text" id="page_title" size="50" />
     
   </div>
   <div class="form-group">
      <label class="control-label">页面关键字</label>
     
        <input class="form-control" value="{$info.keywords}" name="keywords" type="text" id="keywords" size="50" />
      
   </div>
   
   <div class="form-group">
      <label class="control-label">页面描述</label>
     
         <textarea class="form-control" name="description" class="" cols="50" rows="6" id="description">{$info.description}</textarea>
     
   </div></div>
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   <volist name="extendsField" id="vo">
     <div class="tab-pane" id="extendsField{$vo.id}">
<volist name="vo['list']" id="svo">
  
  
  
  <div class="form-group">
      <label class="control-label">{$svo.remark}</label>
      <div>
  
  
  <!--单行文本框-->
    <eq name="svo['type']" value="0">
        <input class="form-control" name="extendsField[{$svo.name}]" value="{$extendsField_val[$svo['name']]}" type="text" />
    </eq>
  <!--下拉框-->
    <eq name="svo['type']" value="2">
        <html:select name="extendsField[{$svo['name']}]" class="form-control" options="svo['_select']" selected="extendsField_val[$svo['name']]" />
    </eq>
    <!--编辑框-->
    <eq name="svo['type']" value="3">
        <html:editor id="{$svo['name']}_" class="form-control" name="extendsField[{$svo['name']}]" type="UEDIT" style="width:100%;">{$extendsField_val[$svo['name']]}</html:editor>
    </eq>
    <!--多行文本-->
    <eq name="svo['type']" value="1">
        <textarea class="form-control" name="extendsField[{$svo.name}]" cols="60" rows="6">{$extendsField_val[$svo['name']]}</textarea>
    </eq>
    <!--上传图片-->
    <eq name="svo['type']" value="4">
        <script>
			function uploaded{$svo.name}(path,name){
				$("#"+name).attr("src",'__PUBLIC__'+path);
				$("input[name='extendsField["+name+"]']").val(path);
			}
			function del_img{$svo.name}(name){
				if(confirm('您确定要删除图片吗?')){
					var file=$("input[name='extendsField["+name+"]']").val();
					$.post("{:U('delImgBypath')}",{'path':file},function(data){
						$("input[name='extendsField["+name+"]']").val('');
						$("#"+name).attr('src','');
					});
				}else{
					return false;
				}
			}
		</script>
        <input type="hidden" name="extendsField[{$svo.name}]" value="{$extendsField_val[$svo['name']]}" />
        <iframe frameborder="0" width="400" height="40" scrolling="no" src="{:U('upload',array('name'=>$svo['name']))}"></iframe>
        <img src="{:getThumbPath($extendsField_val[$svo['name']])}" id="{$svo.name}" height="80" /><a href="javascript:void(0);" onclick="del_img{$svo.name}('{$svo.name}');">删除</a>
    </eq>
    <!--图片上传结束-->
    
  </div></div>
</volist>
</div>

</volist>
   
   
   
   
   
   
   
   
   
   
   
   
   
   
                            </div>
                        </div>
                    </section> 
    </form>
  <style>
     
  </style>
<script>
  
  //删除图组图片
	function mdel_img(path){
		
		$('#img_list div').each(function(index, element) {
                        if($(this).attr('url')==path){
							$(this).remove(); 
						}
                    });
					
					$('#picmsg input').each(function(index, element) {
                        if($(this).val()==path){
							$(this).remove();
						}
                    });
		
	}
	
	
  </script>